package echat.future.cn.echat.my.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import echat.future.cn.echat.R;
import echat.future.cn.echat.my.bean.CollegeBean;
import echat.future.cn.echat.my.utils.ImageLoadUtils;

/**
 * 收藏适配器
 */
public class CollegeAdapter extends BaseQuickAdapter<CollegeBean,BaseViewHolder> {
    public CollegeAdapter(@Nullable List<CollegeBean> data) {
        super(R.layout.item_college,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CollegeBean item) {
        ImageLoadUtils.loadImage(mContext,item.getUser_avatar(),helper.getView(R.id.pic));
        ImageLoadUtils.loadImage(mContext,item.getUser_avatar(),helper.getView(R.id.head));
        helper.setText(R.id.username,item.getUsername())
                .setText(R.id.username2,item.getSign())
                .setText(R.id.college_number,item.getLike_num()+"");
    }
}
